Skip to main content

Class HostResourceTypeBase<T>

Base class for host-provided resource types.

Assembly: WaaS.Core.dll​
View Source​
Declaration
public abstract class HostResourceTypeBase<T> : IHostResourceType<T>, IResourceType, IType, ISortedExportable, ISorted

Implements:
WaaS.ComponentModel.Binding.IHostResourceType<T>, WaaS.ComponentModel.Runtime.IResourceType, WaaS.ComponentModel.Runtime.IType, WaaS.ComponentModel.Runtime.ISortedExportable, WaaS.ComponentModel.Runtime.ISorted

Properties​

Instance​

The component instance that defines this resource type, or null for host resource types.

View Source​
Declaration
public virtual IInstance? Instance { get; }

Methods​

ToHostResource(uint)​

View Source​
Declaration
public T ToHostResource(uint resourceId)
Returns​

<T>

Parameters​
TypeName
System.UInt32resourceId

AllocateResourceId(T)​

View Source​
Declaration
public uint AllocateResourceId(T hostResource)
Returns​

System.UInt32

Parameters​
TypeName
<T>hostResource

Drop(uint)​

Destroys the resource represented by <code class="paramref">rep</code>. Handles are managed by the handle table of each component instance, not by the resource type.

View Source​
Declaration
public void Drop(uint rep)
Parameters​
TypeName
System.UInt32rep

ValidateEquals(IType)​

View Source​
Declaration
public bool ValidateEquals(IType other)
Returns​

System.Boolean

Parameters​
TypeName
WaaS.ComponentModel.Runtime.ITypeother

Wrap(T)​

View Source​
Declaration
public Owned Wrap(T value)
Returns​

WaaS.ComponentModel.Runtime.Owned

Parameters​
TypeName
<T>value

Unwrap(Borrowed)​

View Source​
Declaration
public T Unwrap(Borrowed handle)
Returns​

<T>

Parameters​
TypeName
WaaS.ComponentModel.Runtime.Borrowedhandle

Unwrap(Owned, bool)​

View Source​
Declaration
public T Unwrap(Owned handle, bool moveOut = true)
Returns​

<T>

Parameters​
TypeName
WaaS.ComponentModel.Runtime.Ownedhandle
System.BooleanmoveOut

OnDrop(T)​

View Source​
Declaration
protected virtual void OnDrop(T value)
Parameters​
TypeName
<T>value

Reset()​

View Source​
Declaration
public void Reset()

Implements​